package com.huawei.bitfun.insight.type.converter;

import com.huawei.bitfun.insight.type.SqlStatementTable;

import java.sql.ResultSet;
import java.sql.SQLException;

public class SqlStatementConverter implements RowConverter<SqlStatementTable> {
    @Override
    public SqlStatementTable mapToRow(ResultSet rs) throws SQLException {
        SqlStatementTable sqlStatementTable = new SqlStatementTable();
        sqlStatementTable.setSql(rs.getString("sql"));
        sqlStatementTable.setId(rs.getInt("id"));
        sqlStatementTable.setName(rs.getString("name"));
        return sqlStatementTable;
    }
}
